<%--
  Created by IntelliJ IDEA.
  User: yangkai
  Date: 2016/1/23
  Time: 13:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>导入示例</title>
    <link rel="stylesheet" type="text/css" href="/static/themes/icon.css" />
    <link rel="stylesheet" type="text/css" href="/static/themes/default/easyui.css" />
    <script type="text/javascript" src="/static/jquery.min.js"></script>
    <script type="text/javascript" src="/static/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/static/my-util.js"></script>

</head>
<body>

   <form id="studentRecord-import-form" action="/school/studentRecord/importxls.do" method="post" enctype="multipart/form-data">
       <input  type="file" name="file"  /><a id="studentRecord-import-btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'">导入</a>

   </form>
<script type="text/javascript">

    $('#studentRecord-import-form').form({
        onSubmit: function(){
            // do some check
            // return false to prevent submit;
        },
        success:function(data){
            data=eval("("+data+")");
            MaskUtil.unmask();
            if(data.success){
                $.messager.alert('导入提示',data.msg,'info');
            }else{
                $.messager.alert('导入提示',data.msg,'error');

            }
        },
        onLoadError:function(){
            MaskUtil.unmask();
        }
    });
    $('#studentRecord-import-btn').click(function(){
        MaskUtil.mask("数据正在导入中请稍等...");
        $('#studentRecord-import-form').submit();
        $('#studentRecord-import-dialog').dialog("close");
        return false;
    });

</script>



</body>
</html>
